/*
 * @Author: bankeyu-dell 573569790@qq.com
 * @Date: 2022-10-08 15:53:59
 * @LastEditors: bankeyu-dell 573569790@qq.com
 * @LastEditTime: 2022-10-13 00:47:36
 * @FilePath: \fast-vue3\src\api\questions\index.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { post } from '/@/utils/http/axios';
enum URL {
  questions = '/msvc/questions', // 问题列表
  save = '/msvc/questions/save', // 新增更新问题
}

export interface QuestionsData {
  customerId: number;
  pageNo: number;
  pageSize: number;
}

export interface SaveData {
  contents: string;
  customerId: number;
  fileurl: string;
  title: string;
}

const questions = async (data: QuestionsData) => post<any>({ url: URL.questions, data });
const save = async (data: SaveData) => post<any>({ url: URL.save, data });
export { questions, save };
